<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" content="">
		<title>core - d3.select(node)</title>
		<style type="text/css">
			table {
				margin: 20px;
				background-color: #eee;
				font-weight:bold;
			}

			td {
				padding: 8px;
			}
		</style>
	</head>
	<script type="text/javascript" src="../../d3.js"></script>
	<div style="width:300px;height:100px;">
		<table>
			<tr>
				<td>苹果</td>	
				<td>香蕉</td>
				<td>西瓜</td>
			</tr>
			<tr>
				<td>桃子</td>	
				<td id="test">草莓</td>
				<td>菠萝</td>
			</tr>
		</table>

		<table>
			<tr>
				<td>可乐</td>
				<td>牛奶</td>
			</tr>
			<tr>
				<td>绿茶</td>
				<td class="test">啤酒</td>
			</tr>
		</table>
	</div>

	<script>
		d3.select(document.body).on("click",function(){ 
			console.log(d3.select(this));
			d3.select(this).style("color","green");
		});	//body监听单击事件，单击body区域设置字体的颜色变为绿色
	</script>